using System.Collections.Generic;
using Voodoo.Sauce.Internal.Extension;

namespace Voodoo.Sauce.Internal.Analytics
{
	internal class AdSession
	{
		public string Placement;

		public string AdNetwork;

		public double? Cpm;

		public string CreativeId;

		public bool IsClicked;

		public int Duration;

		public bool IsSkipped;

		public Dictionary<string, object> ToDictionary()
		{
			Dictionary<string, object> obj = new Dictionary<string, object>
			{
				{ "placement", Placement },
				{ "duration", Duration },
				{
					"is_clicked",
					IsClicked ? 1 : 0
				},
				{
					"is_skipped",
					IsSkipped ? 1 : 0
				}
			};
			obj.AddIfNotNull("crea_id", CreativeId);
			obj.AddIfNotNull("ad_network", AdNetwork);
			obj.AddIfNotNull("cpm", Cpm);
			return obj;
		}
	}
}
